home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / bigfoot / bigfoot.bas next >
BASIC Source File  |  1995-03-07  |  2KB  |  60 lines

  1. Option Explicit
  2.  
  3. Type RECT   '8 Bytes
  4.         left As Integer
  5.         top As Integer
  6.         right As Integer
  7.         bottom As Integer
  8. End Type
  9.  
  10. Type TEXTMETRIC   '31 Bytes
  11.         tmHeight As Integer
  12.         tmAscent As Integer
  13.         tmDescent As Integer
  14.         tmInternalLeading As Integer
  15.         tmExternalLeading As Integer
  16.         tmAveCharWidth As Integer
  17.         tmMaxCharWidth As Integer
  18.         tmWeight As Integer
  19.         tmItalic As String * 1
  20.         tmUnderlined As String * 1
  21.         tmStruckOut As String * 1
  22.         tmFirstChar As String * 1
  23.         tmLastChar As String * 1
  24.         tmDefaultChar As String * 1
  25.         tmBreakChar As String * 1
  26.         tmPitchAndFamily As String * 1
  27.         tmCharSet As String * 1
  28.         tmOverhang As Integer
  29.         tmDigitizedAspectX As Integer
  30.         tmDigitizedAspectY As Integer
  31. End Type
  32.  
  33. Declare Sub ShellAbout Lib "shell.dll" (ByVal hWndOwner%, ByVal lpszAppName$, ByVal lpszMoreInfo$, ByVal hIcon%)
  34. Declare Function SendMessage& Lib "User" (ByVal hwnd%, ByVal wMsg%, ByVal wParam%, lParam As Any)
  35. Declare Function SendMessageByNum& Lib "User" Alias "SendMessage" (ByVal hwnd%, ByVal wMsg%, ByVal wParam%, ByVal lParam&)
  36. Declare Function GetDC% Lib "User" (ByVal hwnd%)
  37. Declare Function ReleaseDC% Lib "User" (ByVal hwnd%, ByVal hDC%)
  38. Declare Function SelectObject% Lib "GDI" (ByVal hDC%, ByVal hObject%)
  39. Declare Function GetTextMetrics% Lib "GDI" (ByVal hDC%, lpMetrics As TEXTMETRIC)
  40.  
  41. 'AVELINELENGTH is used a to calculate how many lines of the file to
  42. 'put in each file buffer to avoid busting the 32K limit of the Text Box.
  43. 'AVELINELENGTH can be adjusted for files with long lines.
  44. 'However, the program will automatically attempt to adjust itself by
  45. 'multiplying ave-line-length times 1.25 five times running before giving up.
  46. 'i.e. an AVELINELENGTH of 80 will handle a file with ave-line-length of 243.
  47.  
  48. Global Const AVELINELENGTH = 80
  49.  
  50. Global Const MAXLINESVISIBLE = 48  'max lines needed to fit in textbox view
  51.                                    'e.g. 48 for maximized window using 1024x768 small font
  52. Global Const DEFAULT = 0        ' MOUSE POINTER
  53. Global Const HOURGLASS = 11     ' MOUSE CURSOR
  54. Global Const WM_GETFONT = &H31
  55. '  Private Window Messages Start Here:
  56. Global Const WM_USER = &H400
  57. Global Const EM_LINESCROLL = WM_USER + 6  ' = &H406
  58. Global Const EM_GETRECT = WM_USER + 2
  59.  
  60.